home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIPluginManager2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  12KB  |  285 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPluginManager2.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPluginManager2_h__
  6. #define __gen_nsIPluginManager2_h__
  7.  
  8.  
  9. #ifndef __gen_nsIPluginManager_h__
  10. #include "nsIPluginManager.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIPlugin; /* forward declaration */
  18.  
  19. class nsIEventHandler; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIPluginManager2 */
  23. #define NS_IPLUGINMANAGER2_IID_STR "d2962dc0-4eb6-11d2-8164-006008119d7a"
  24.  
  25. #define NS_IPLUGINMANAGER2_IID \
  26.   {0xd2962dc0, 0x4eb6, 0x11d2, \
  27.     { 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
  28.  
  29. /**
  30.  * Plugin Manager 2 Interface
  31.  * These extensions to nsIPluginManager are only available in Communicator 5.0.
  32.  */
  33. class NS_NO_VTABLE nsIPluginManager2 : public nsIPluginManager {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER2_IID)
  37.  
  38.   /**
  39.    * Puts up a wait cursor.
  40.    *
  41.    * @result - NS_OK if this operation was successful
  42.    */
  43.   /* void beginWaitCursor (); */
  44.   NS_IMETHOD BeginWaitCursor(void) = 0;
  45.  
  46.   /**
  47.    * Restores the previous (non-wait) cursor.
  48.    *
  49.    * @result - NS_OK if this operation was successful
  50.    */
  51.   /* void endWaitCursor (); */
  52.   NS_IMETHOD EndWaitCursor(void) = 0;
  53.  
  54.   /**
  55.    * Returns true if a URL protocol (e.g. "http") is supported.
  56.    *
  57.    * @param aProtocol - the protocol name
  58.    * @param aResult   - true if the protocol is supported
  59.    * @result          - NS_OK if this operation was successful
  60.    */
  61.   /* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
  62.   NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) = 0;
  63.  
  64.   /**
  65.    * This method may be called by the plugin to indicate that an error 
  66.    * has occurred, e.g. that the plugin has failed or is shutting down 
  67.    * spontaneously. This allows the browser to clean up any plugin-specific 
  68.    * state.
  69.    *
  70.    * @param aPlugin - the plugin whose status is changing
  71.    * @param aStatus - the error status value
  72.    * @result        - NS_OK if this operation was successful
  73.    */
  74.   /* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
  75.   NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) = 0;
  76.  
  77.   /**
  78.    * Returns the proxy info for a given URL. The caller is required to
  79.    * free the resulting memory with nsIMalloc::Free. The result will be in the
  80.    * following format
  81.    * 
  82.    *   i)   "DIRECT"  -- no proxy
  83.    *   ii)  "PROXY xxx.xxx.xxx.xxx"   -- use proxy
  84.    *   iii) "SOCKS xxx.xxx.xxx.xxx"  -- use SOCKS
  85.    *   iv)  Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112",
  86.    *                    "PROXY 111.111.111.111;SOCKS 112.112.112.112"....
  87.    *
  88.    * Which proxy/SOCKS to use is determined by the plugin.
  89.    */
  90.   /* void findProxyForURL (in string aURL, out string aResult); */
  91.   NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) = 0;
  92.  
  93.   /**
  94.    * Registers a top-level window with the browser. Events received by that
  95.    * window will be dispatched to the event handler specified.
  96.    * 
  97.    * @param aHandler - the event handler for the window
  98.    * @param aWindow  - the platform window reference
  99.    * @result         - NS_OK if this operation was successful
  100.    */
  101.   /* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
  102.   NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0;
  103.  
  104.   /**
  105.    * Unregisters a top-level window with the browser. The handler and window pair
  106.    * should be the same as that specified to RegisterWindow.
  107.    *
  108.    * @param aHandler - the event handler for the window
  109.    * @param aWindow  - the platform window reference
  110.    * @result         - NS_OK if this operation was successful
  111.    */
  112.   /* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
  113.   NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0;
  114.  
  115.   /**
  116.    * Allocates a new menu ID (for the Mac).
  117.    *
  118.    * @param aHandler   - the event handler for the window
  119.    * @param aIsSubmenu - whether this is a sub-menu ID or not
  120.    * @param aResult    - the resulting menu ID
  121.    * @result           - NS_OK if this operation was successful
  122.    */
  123.   /* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */
  124.   NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) = 0;
  125.  
  126.   /**
  127.    * Deallocates a menu ID (for the Mac).
  128.    *
  129.    * @param aHandler - the event handler for the window
  130.    * @param aMenuID  - the menu ID
  131.    * @result         - NS_OK if this operation was successful
  132.    */
  133.   /* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */
  134.   NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) = 0;
  135.  
  136.   /**
  137.    * Indicates whether this event handler has allocated the given menu ID.
  138.    *
  139.    * @param aHandler - the event handler for the window
  140.    * @param aMenuID  - the menu ID
  141.    * @param aResult  - returns PR_TRUE if the menu ID is allocated
  142.    * @result         - NS_OK if this operation was successful
  143.    */
  144.   /* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */
  145.   NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) = 0;
  146.  
  147. };
  148.  
  149. /* Use this macro when declaring classes that implement this interface. */
  150. #define NS_DECL_NSIPLUGINMANAGER2 \
  151.   NS_IMETHOD BeginWaitCursor(void); \
  152.   NS_IMETHOD EndWaitCursor(void); \
  153.   NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult); \
  154.   NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus); \
  155.   NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult); \
  156.   NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \
  157.   NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \
  158.   NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult); \
  159.   NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID); \
  160.   NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult); 
  161.  
  162. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  163. #define NS_FORWARD_NSIPLUGINMANAGER2(_to) \
  164.   NS_IMETHOD BeginWaitCursor(void) { return _to BeginWaitCursor(); } \
  165.   NS_IMETHOD EndWaitCursor(void) { return _to EndWaitCursor(); } \
  166.   NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return _to SupportsURLProtocol(aProtocol, aResult); } \
  167.   NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return _to NotifyStatusChange(aPlugin, aStatus); } \
  168.   NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return _to FindProxyForURL(aURL, aResult); } \
  169.   NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to RegisterWindow(aHandler, aWindow); } \
  170.   NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to UnregisterWindow(aHandler, aWindow); } \
  171.   NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return _to AllocateMenuID(aHandler, aIsSubmenu, aResult); } \
  172.   NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return _to DeallocateMenuID(aHandler, aMenuID); } \
  173.   NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return _to HasAllocatedMenuID(aHandler, aMenuID, aResult); } 
  174.  
  175. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  176. #define NS_FORWARD_SAFE_NSIPLUGINMANAGER2(_to) \
  177.   NS_IMETHOD BeginWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginWaitCursor(); } \
  178.   NS_IMETHOD EndWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndWaitCursor(); } \
  179.   NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsURLProtocol(aProtocol, aResult); } \
  180.   NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStatusChange(aPlugin, aStatus); } \
  181.   NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindProxyForURL(aURL, aResult); } \
  182.   NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWindow(aHandler, aWindow); } \
  183.   NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterWindow(aHandler, aWindow); } \
  184.   NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateMenuID(aHandler, aIsSubmenu, aResult); } \
  185.   NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeallocateMenuID(aHandler, aMenuID); } \
  186.   NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAllocatedMenuID(aHandler, aMenuID, aResult); } 
  187.  
  188. #if 0
  189. /* Use the code below as a template for the implementation class for this interface. */
  190.  
  191. /* Header file */
  192. class nsPluginManager2 : public nsIPluginManager2
  193. {
  194. public:
  195.   NS_DECL_ISUPPORTS
  196.   NS_DECL_NSIPLUGINMANAGER2
  197.  
  198.   nsPluginManager2();
  199.  
  200. private:
  201.   ~nsPluginManager2();
  202.  
  203. protected:
  204.   /* additional members */
  205. };
  206.  
  207. /* Implementation file */
  208. NS_IMPL_ISUPPORTS1(nsPluginManager2, nsIPluginManager2)
  209.  
  210. nsPluginManager2::nsPluginManager2()
  211. {
  212.   /* member initializers and constructor code */
  213. }
  214.  
  215. nsPluginManager2::~nsPluginManager2()
  216. {
  217.   /* destructor code */
  218. }
  219.  
  220. /* void beginWaitCursor (); */
  221. NS_IMETHODIMP nsPluginManager2::BeginWaitCursor()
  222. {
  223.     return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225.  
  226. /* void endWaitCursor (); */
  227. NS_IMETHODIMP nsPluginManager2::EndWaitCursor()
  228. {
  229.     return NS_ERROR_NOT_IMPLEMENTED;
  230. }
  231.  
  232. /* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
  233. NS_IMETHODIMP nsPluginManager2::SupportsURLProtocol(const char *aProtocol, PRBool *aResult)
  234. {
  235.     return NS_ERROR_NOT_IMPLEMENTED;
  236. }
  237.  
  238. /* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
  239. NS_IMETHODIMP nsPluginManager2::NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus)
  240. {
  241.     return NS_ERROR_NOT_IMPLEMENTED;
  242. }
  243.  
  244. /* void findProxyForURL (in string aURL, out string aResult); */
  245. NS_IMETHODIMP nsPluginManager2::FindProxyForURL(const char *aURL, char **aResult)
  246. {
  247.     return NS_ERROR_NOT_IMPLEMENTED;
  248. }
  249.  
  250. /* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
  251. NS_IMETHODIMP nsPluginManager2::RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow)
  252. {
  253.     return NS_ERROR_NOT_IMPLEMENTED;
  254. }
  255.  
  256. /* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
  257. NS_IMETHODIMP nsPluginManager2::UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow)
  258. {
  259.     return NS_ERROR_NOT_IMPLEMENTED;
  260. }
  261.  
  262. /* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */
  263. NS_IMETHODIMP nsPluginManager2::AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult)
  264. {
  265.     return NS_ERROR_NOT_IMPLEMENTED;
  266. }
  267.  
  268. /* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */
  269. NS_IMETHODIMP nsPluginManager2::DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID)
  270. {
  271.     return NS_ERROR_NOT_IMPLEMENTED;
  272. }
  273.  
  274. /* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */
  275. NS_IMETHODIMP nsPluginManager2::HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult)
  276. {
  277.     return NS_ERROR_NOT_IMPLEMENTED;
  278. }
  279.  
  280. /* End of implementation class template. */
  281. #endif
  282.  
  283.  
  284. #endif /* __gen_nsIPluginManager2_h__ */
  285.